from pyecharts.charts import Line
from pyecharts.options import *
# 创建图像对象
line = Line()
# 添加X轴
line.add_xaxis(["中国","美国","俄罗斯"])
# 添加Y轴
line.add_yaxis("GDP",["30","20","10"])
# 设置全部配置项
line.set_global_opts(
    title_opts=TitleOpts(title="各国GDP展示",pos_left="center",pos_bottom="90%",is_show=True),
    toolbox_opts=ToolboxOpts(is_show=True),
    legend_opts=LegendOpts(is_show=True),
    visualmap_opts=VisualMapOpts(is_show=True),
)
# 渲染
line.render()